<html>
<head><meta charset="utf-8"><title>Console output · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html">Console output</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="217699447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217699447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217699447">(Nov 23 2020 at 23:57)</a>:</h4>
<p>Hi. I've been thinking about Cargo's console output while building. It doesn't give much indication of how long each crate takes to compile. In fact, it's quite misleading, because it's easy to assume that builds are serial, and if you have a crate X that takes a long time to build you might think another crate (that starts being built just after X) is actually the slow-to-build one.</p>



<a name="217699530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217699530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217699530">(Nov 23 2020 at 23:58)</a>:</h4>
<p>I was wondering if it would be possible to change the console output a little to give more info, to push it in the direction of -Ztimings</p>



<a name="217699551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217699551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217699551">(Nov 23 2020 at 23:58)</a>:</h4>
<p>Obviously -Ztimings has a lot of info and console output would never approach it, but getting a little in that direction would be interesting.</p>



<a name="217699701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217699701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217699701">(Nov 24 2020 at 00:00)</a>:</h4>
<p>For example, if instead of printing "Compiling &lt;crate&gt;" when it starts building a crate, it instead printed "Compiled &lt;crate&gt; in X.YYs".</p>



<a name="217699760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217699760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217699760">(Nov 24 2020 at 00:00)</a>:</h4>
<p>I think it does that if you do <code>-Ztimings=info</code>? Sorry if I'm misunderstanding.</p>



<a name="217699800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217699800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217699800">(Nov 24 2020 at 00:01)</a>:</h4>
<p>Ah, you mean always do that, regardless of flags.</p>



<a name="217699859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217699859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217699859">(Nov 24 2020 at 00:02)</a>:</h4>
<p>Right. Many people don't know about -Ztimings, and it's the kind of thing you only run occasionally.</p>



<a name="217699886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217699886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217699886">(Nov 24 2020 at 00:02)</a>:</h4>
<p>If build timings were always printed, people would know immediately which crates are slow to build</p>



<a name="217700036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217700036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217700036">(Nov 24 2020 at 00:04)</a>:</h4>
<p>Similarly, if you have a wide terminal, the progress bar at the bottom shows which crates are being built (on the right-hand side). This helps with understanding that builds are parallel, and what's going on. But it's not visible with a narrow (e.g. 80 char) terminal. So I think the progress bar should be smaller so that the crate names show up on narrower terminals.</p>



<a name="217700078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217700078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217700078">(Nov 24 2020 at 00:04)</a>:</h4>
<p>The general idea is to tweak the console output to give the user a better idea of what's happening in the compilation process, and how long it's taking.</p>



<a name="217700089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217700089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217700089">(Nov 24 2020 at 00:04)</a>:</h4>
<p>All these sound like positive changes, not that I have any say here (I am biased in favor though, as I've spent a lot of time trying to improve build times and wish people would pay more attention to this stuff...)</p>



<a name="217701239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217701239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217701239">(Nov 24 2020 at 00:21)</a>:</h4>
<p>More clearly indicating the linking step might also be helpful</p>



<a name="217702449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217702449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217702449">(Nov 24 2020 at 00:40)</a>:</h4>
<p>I filed <a href="https://github.com/rust-lang/cargo/issues/8889">https://github.com/rust-lang/cargo/issues/8889</a></p>



<a name="217704421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217704421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217704421">(Nov 24 2020 at 01:15)</a>:</h4>
<p>All this sounds awesome :) I think <span class="user-mention" data-user-id="210267">@Nemo157</span> built something like this, I need to find the link</p>



<a name="217704502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217704502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217704502">(Nov 24 2020 at 01:16)</a>:</h4>
<p><a href="https://github.com/Nemo157/cargo-build-tree">https://github.com/Nemo157/cargo-build-tree</a></p>



<a name="217705377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217705377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217705377">(Nov 24 2020 at 01:33)</a>:</h4>
<p>That's fun. But I want something that isn't opt-in.</p>



<a name="217705390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Console%20output/near/217705390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Console.20output.html#217705390">(Nov 24 2020 at 01:33)</a>:</h4>
<p>I filed <a href="https://github.com/rust-lang/cargo/pull/8892">https://github.com/rust-lang/cargo/pull/8892</a> for the easiest part (shrinking the progress bar to leave more space for the crate names after it)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>